import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;


public class ReadTagFiles 
{
	public  ReadTagFiles(String tagFile, String eosFile, String pauseFile) throws IOException
	{
		tags = new HashMap<String, Integer>();
		eos = new HashMap<String, Integer>();
		pause = new HashMap<String, Integer>();
		
		readFile(tagFile, tags);
		readFile(eosFile, eos);
		readFile(pauseFile, pause);
	}
	
	public void readFile(String fileName, HashMap<String, Integer> tags) throws IOException
	{
		FileReader fr = new FileReader(fileName);
		BufferedReader br = new BufferedReader(fr); 
		String s;
		int count = 0;
		while((s = br.readLine()) != null) 
		{ 
			tags.put(s.trim(), count++); 
			System.out.println(tags.get(s.trim()));
		} 
		fr.close(); 
	}
	
	public HashMap<String, Integer> getTags()
	{
		return tags;
	}
	
	public HashMap<String, Integer> getEos()
	{
		return eos;
	}
	
	public HashMap<String, Integer> getPause()
	{
		return pause;
	}

	private HashMap<String, Integer> tags;
	private HashMap<String, Integer> pause;
	private HashMap<String, Integer> eos;
	
}
